import { List, InputItem,TextareaItem} from "antd-mobile";
import { createForm } from "rc-form";
import React from "react";
import PropTypes from "prop-types";
import './index.less'
class BasicForm extends React.Component {
  constructor(props) {
    super(props);
  }
  handleClick = () => {
    this.customFocusInst.focus();
  };
  render() {
    const {item} = this.props
    const { getFieldProps} = this.props.form;
    return (
      <div style={{ width: "100%", fontSize: '14px' }}>
        <List>
        <TextareaItem
        title="标题"
        editable={false}
        rows='2'
        {...getFieldProps("title",{initialValue: item.title})}
        data-seed="logId"
        ref={el => this.autoFocusInst = el}
        autoHeight
      />
      <InputItem
            {...getFieldProps("leval",{initialValue: item.no})}
            clear
            editable={false}
            ref={el => (this.customFocusInst = el)}
          >
            编号
          </InputItem>
          <InputItem
            {...getFieldProps("leval",{initialValue: item.level})}
            clear
            editable={false}
            ref={el => (this.customFocusInst = el)}
          >
            紧急程度
          </InputItem>
          <InputItem
            clear
            {...getFieldProps("leval",{initialValue: '一般'})}
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            附件
          </InputItem>
          <InputItem
            clear
            {...getFieldProps("leval",{initialValue: '我是文档.doc'})}
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            拟稿单位
          </InputItem>
          <InputItem
            clear
            {...getFieldProps("leval",{initialValue: '某某单位'})}
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            拟稿人
          </InputItem>
          <InputItem
            {...getFieldProps("leval",{initialValue: '占位文字'})}
            clear
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            呈送领导
          </InputItem>
          <InputItem
            {...getFieldProps("leval",{initialValue: '张学友'})}
            clear
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            拟稿日期
          </InputItem>
          <InputItem
          {...getFieldProps("leval",{initialValue: '2018-01-01'})}
            clear
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            联系电话
          </InputItem>
          <InputItem
          {...getFieldProps("leval",{initialValue: '13888888888'})}
            clear
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            会签部门
          </InputItem>
          <InputItem
          {...getFieldProps("leval",{initialValue: '占位文字'})}
            clear
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            主送单位
          </InputItem>
          <InputItem
          {...getFieldProps("leval",{initialValue: '某某单位'})}
            clear
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            抄送单位
          </InputItem>
          <InputItem
          {...getFieldProps("leval",{initialValue: '占位文字'})}
            clear
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            阅知人员
          </InputItem>{" "}
          <InputItem
          {...getFieldProps("leval",{initialValue: '2018-01-01'})}
            clear
            editable={false}
            placeholder="click the button below to focus"
            ref={el => (this.customFocusInst = el)}
          >
            阅知日期
          </InputItem>
          <TextareaItem
          title="备注"
          rows='2'
          editable={false}
          placeholder="备注"
          data-seed="logId"
          ref={el => this.autoFocusInst = el}
          autoHeight
        />
        </List>
      </div>
    );
  }
}

BasicForm.PropTypes = {
 item: PropTypes.object
}
export default createForm()(BasicForm);
